﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Configuration;

namespace FONCREAGROINTEGRAL.Reporting.RRHH
{
    public partial class NetoPagar : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string IdEjercicioMes = Convert.ToString(Request.QueryString["IdEjercicioMes"]);
                string IdTipoTrabajador = Convert.ToString(Request.QueryString["IdTipoTrabajador"]);

                var reportServer = ConfigurationManager.AppSettings["ReportServer"].ToString();
                rptNetoPagar.ProcessingMode = ProcessingMode.Remote;
                rptNetoPagar.ServerReport.ReportServerUrl = new Uri(reportServer);
                rptNetoPagar.ServerReport.ReportPath = "/RRHH/NetoPagar";


                rptNetoPagar.ShowPrintButton = true;
                rptNetoPagar.ShowParameterPrompts = false;
                ReportParameter[] param = new ReportParameter[2];
                param[0] = new ReportParameter("idejerciciomes", IdEjercicioMes);
                param[1] = new ReportParameter("IdTipoTrabajador", IdTipoTrabajador);
                rptNetoPagar.ServerReport.SetParameters(param);

                rptNetoPagar.ServerReport.Refresh();
            }
        }
    }
}